import express from "express";
import {context} from "../server/ServerContext";

const home =express.Router()

home.get("/", (req, res, next) => {
    res.send("welcome to home index")
})

home.get("/users", (req, res) => {
    res.send(['zhang','wang','li','zhao','...'])
})

home.get("/shutdown", (req, res) => {
    res.send("service 已经关闭")
    context.server?.shutdown()
})

export default home;